home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2005 October / PCWOCT05.iso / Software / FromTheMag / XAMPP 1.4.14 / xampp-win32-1.4.14-installer.exe / xampp / php / pear / docs / xdiff / .tmpREADME.API < prev   
Text File  |  2004-03-24  |  3KB  |  72 lines

  1. This extension requires libxdiff (http://www.xmailserver.org/xdiff-lib.html).
  2.  
  3. API:
  4.  
  5. * mixed xdiff_string_diff(string str1, string str2, [int context, [bool minimal]])
  6.  
  7. Makes unified diff of strings str1 and str2. 'context' indicates how many
  8. lines of context you want to include in diff result. Set 'minimal' to true if
  9. you want to minimalize size of diff (can take a long time).  Returns string
  10. with result or false if an internal error happened.
  11.  
  12. * bool xdiff_file_diff(string file1, string file2, string dest, [int context, [bool minimal]])
  13.  
  14. Makes unified diff of files file1 and file2 and stores result in file dest.
  15. 'context' indicates how many lines of context you want to include in diff
  16. result. Set 'minimal' to true if you want to minimalize size of diff (can take
  17. a long time).
  18.  
  19. * mixed xdiff_string_diff_binary(string str1, string str2)
  20.  
  21. Makes binary diff of strings str1 and str2.  Returns string with result or
  22. false if an internal error happened.
  23.  
  24. * bool xdiff_file_diff_binary(string file1, string file2, string dest)
  25.  
  26. Makes binary diff of files file1 and file2 and stores result in file dest.
  27. Returns string with result or false if an internal error happened.
  28.  
  29. * string xdiff_string_patch(string file, string patch [, int flags, [string error]])
  30.  
  31. Patches string 'file' with unified patch in 'patch' and returns a patched string.
  32. 'flags' can be one of:
  33. XDIFF_PATCH_NORMAL - normal patch (default)
  34. XDIFF_PATCH_REVERSE - reverse patch
  35.  
  36. If 'error' is passed then error is stored inside this variable (it is passed by reference).
  37.  
  38. * mixed xdiff_file_patch(string file, string patch, string dest [, int flags])
  39.  
  40. Patches file 'file' with unified patch in file 'patch'.
  41. 'flags' can be one of:
  42. XDIFF_PATCH_NORMAL - normal patch (default)
  43. XDIFF_PATCH_REVERSE - reverse patch
  44.  
  45. Returns false if an internal error happened, string with rejected chunks of
  46. patch or true if patch was applied successfully.
  47.  
  48. * string xdiff_string_patch_binary(string str, string patch)
  49.  
  50. Patches string 'str' with binary patch 'patch'.
  51. Returns patched string or false if an internal error happened.
  52.  
  53. * bool xdiff_file_patch_binary(string file, string patch, string dest)
  54.  
  55. Patches file 'file' with binary patch in file 'patch' and stores result in file 'dest'.
  56. Returns true if file was patched successfully, false otherwise.
  57.  
  58. * string xdiff_string_merge3(string str1, string str2, string str3 [, string error])
  59.  
  60. Merges strings 'str1', 'str2' and 'str3' into one. Returns merged string or
  61. false if an internal error happened.  If 'error' is passed then error is
  62. stored inside this variable (it is passed by reference).
  63.  
  64. * mixed xdiff_file_merge3(string file1, string file2, string file3, string dest)
  65.  
  66. Merges files 'file1', 'file2' and 'file3' into one and stores result in file
  67. 'dest'.  Returns true if merge was successful, string with rejected chunks if
  68. it was not or false if an internal error happened.
  69.  
  70.  
  71. vim:tw=78:et:
  72.